#ifndef MYGLWIDGET_H
#define MYGLWIDGET_H

#include <QGLWidget>

#include "matrixstack.h"

class MainWindow;

class MyGLWidget : public QGLWidget
{
    Q_OBJECT

public:
	MyGLWidget(const QGLFormat &fmt, QWidget *parent, MainWindow &mainWindow);
	
	void setVector(float x, float y, float z);

	MatrixStack &getMatrixStack() { return m_mtxStack; }

protected:
    void initializeGL();
	void resizeGL(int newW, int newH);
    void paintGL();

private:
	void drawAxis(float length = 1.0f, float markSize = 0.1f);
	void drawVector();
	
	float m_vectorX, m_vectorY, m_vectorZ;
	MatrixStack m_mtxStack;
};

#endif // MYGLWIDGET_H
